package com.ranqianhuii.ojbackendserviceclient.service;

import com.ranqianhui.ojbackendmodel.model.entity.Question;
import com.ranqianhui.ojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;



/**
* @author 冉前辉
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2025-03-19 12:58:59
*/
@FeignClient(name = "oj-backend-question-service",path = "/api/question/inner")
public interface QuestionClient {
    /**
     * id查询题目
     * @param questionId
     * @return
     */
    @GetMapping("/get/id")
    Question getQuestionById(@RequestParam("questionId") Long questionId);

    /**
     * id查询提交题目
     * @param questionSubmitId
     * @return
     */
    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") Long questionSubmitId);

    /**
     * 修改提交题目
     * @param questionSubmitUpdate
     * @return
     */
    @PostMapping("/question_submit/update")
    Boolean updateById(@RequestBody QuestionSubmit questionSubmitUpdate);
}
